#ifndef _PARSER_H_
#define _PARSER_H_

#include <qlistview.h>
#include <qdom.h>
#include <qfile.h>
#include <qmessagebox.h>
#include <q3listview.h>
#include <iostream>
#include <map>

class Scene;

using namespace std;

class SceneXmlParser
{

public:
	 SceneXmlParser();
	 void parse( const QString fileName, Q3ListView *listview, QWidget *parent = 0 );

	 ~SceneXmlParser();
	 void parseSceneElement(QDomElement);
	 void parseShaderElement(QDomElement,Scene *s);
	 void checkXML();
	 map<QString, Scene*> Scenes;
	 Scene* getSceneByName(QString id);

private:
	 QDomDocument domTree;
	 Q3ListView *m_listView;
	 Q3ListViewItem *geometries;
	 Q3ListViewItem *textures;
	 Q3ListViewItem *paths;
	 Q3ListViewItem *shaders;
	 Q3ListViewItem *objects;

};

#endif
